package com.fortune.dto.in.distributorMgt;

import com.fortune.constants.PatternConstants;
import com.fortune.constants.enums.AccountInfoEnum;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

public class DAccountAddDto {
	@NotBlank(message="经销商名称不能为空")
	@ApiModelProperty(required=true, example="经销商名称")
	private String name;
	@NotBlank(message="经销商编号不能为空")
	@ApiModelProperty(required=true, example="经销商编号")
	private String number;
	@NotBlank(message="经销商简称不能为空")
	@ApiModelProperty(required=true, example="经销商简称")
	private String abbreviation;
	@Pattern(regexp= PatternConstants.PHONE, message="手机号格式错误")
	@ApiModelProperty(required=true, example="负责人手机号")
	private String principalPhone;
	@NotBlank(message="负责人姓名不能为空")
	@ApiModelProperty(required=true, example="负责人姓名")
	private String principalName;
	@Min(value = 0,message="客户数量上限不能为空")
	@ApiModelProperty(example="客户数量上限")
	private int cUpLimit;
	@Min(value = 0,message="最大连接数不能为空")
	@ApiModelProperty(example="最大连接数")
	private int maxConnect;
	@NotNull(message="截止时间不能为空")
	@ApiModelProperty(example="截止时间(2016-07-06 10:17:48)")
	private Date endTime;
	@NotNull(message="账户状态不能为空")
	@ApiModelProperty(required=true, example="账户状态(YES,NO)")
	private AccountInfoEnum status;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getAbbreviation() {
		return abbreviation;
	}

	public void setAbbreviation(String abbreviation) {
		this.abbreviation = abbreviation;
	}

	public String getPrincipalPhone() {
		return principalPhone;
	}

	public void setPrincipalPhone(String principalPhone) {
		this.principalPhone = principalPhone;
	}

	public String getPrincipalName() {
		return principalName;
	}

	public void setPrincipalName(String principalName) {
		this.principalName = principalName;
	}

	public int getcUpLimit() {
		return cUpLimit;
	}

	public void setcUpLimit(int cUpLimit) {
		this.cUpLimit = cUpLimit;
	}

	public int getMaxConnect() {
		return maxConnect;
	}

	public void setMaxConnect(int maxConnect) {
		this.maxConnect = maxConnect;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public AccountInfoEnum getStatus() {
		return status;
	}

	public void setStatus(AccountInfoEnum status) {
		this.status = status;
	}

	@Override
	public String toString() {
		return "DAccountAddDto{" +
				"name='" + name + '\'' +
				", number='" + number + '\'' +
				", abbreviation='" + abbreviation + '\'' +
				", principalPhone='" + principalPhone + '\'' +
				", principalName='" + principalName + '\'' +
				", cUpLimit=" + cUpLimit +
				", maxConnect=" + maxConnect +
				", endTime=" + endTime +
				", status=" + status +
				'}';
	}
}
